package com.aos.erp.schools.rpc.division;


import com.aos.erp.common.exception.BizException;
import com.aos.erp.schools.model.division.entity.Division;
import com.aos.erp.schools.service.division.DivisionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.validation.constraints.NotNull;

/**
 * <p>
 * 傲雄驾校管理 前端控制器
 * </p>
 *
 * @author 杨文博
 * @since 2018-12-02
 */
@Slf4j
@RestController("RpcGatherSchoolController")
@RequestMapping("/service/division")
@Api(value="rpc车管所管理接口",tags={"rpc车管所管理接口"})
public class DivisionController {

	@Autowired
	private DivisionService divisionService;

	@PostMapping("/info")
	@ApiOperation(value = "根据Id获取车管所")
	@ApiModelProperty(value = "车管所ID", required = true, dataType = "long")
	public Division info(@RequestBody Long id) throws BizException {
		if(id==null){
			throw new BizException("请传入参数");
		}
		return divisionService.info(id);
	}



}

